import Vue from 'vue';
import Vuex from 'vuex'
Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    count: 3
  },
  mutations: {
    increment (state, param) {
      state.count = state.count + param
    },
    jian (state, param) {
      state.count = state.count - param
    }
  },
  getters: {
    countValue: function (state) {
      return '当前count值为' + state.count
    }
  }
})
export default store
